home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hardcore Gamer Resource Kit
/
Hardcore Gamer Resource Kit - Disc 2.iso
/
Utils
/
UNIX
/
UNZIP520
/
HUMAN68K
/
OPTIONS.S
< prev
Wrap
Text File
|
1992-11-23
|
2KB
|
143 lines
*****************************************
* *
* TwentyOne.x üué╞éúéÑé╔éíéφé±üv *
* patch for human Ver 2.02,2.03 *
* *
*****************************************
*
* file name: options.s
* author: édéÿéö (T.Kawamoto)
* last modify: 92/3/1
* 92/3/17 thanks YUU(HARUKA)
*
blpeek: macro
moveq.l #$84,d0
trap #15
endm
*
getpdb: macro
dc.w $ff51
endm
*
.xdef _TwentyOneOptions
*
.text
*
_TwentyOneOptions:
movem.l a0-a2,-(sp)
bsr search_memory_blindly
tst.l d0
bne return
bsr search_device_blindly
return:
movem.l (sp)+,a0-a2
rts
*
search_device_blindly:
lea $00006800,a1
search_NUL_device_loop:
cmp.l #$00020000,a1
bcc sd_not_found
blpeek
cmp.l #'NUL ',d0
beq found_NUL_device
* lea 4(a1),a1 * ê╚ë║é╠ùvù╠éµéΦ
* é▒é▒é┼âCâôâNâèâüâôâgé╖éΘòKùvé═
* éáéΦé▄é╣é± 1992.03.17 YUU(HARUKA).
cmp.w #'NU',d0
bne search_NUL_device_loop
lea -2(a1),a1
bra search_NUL_device_loop
*
found_NUL_device:
* lea -14(a1),a1 * ü⌐ é▒é▒é¬é¿é⌐é╡éó
lea -18(a1),a1 * IOCS B_LPEEK é╠û▀éΦÆl a1
* é═ d0 é╠Ælé≡ĵô╛é╡é╜âAâhâîâX + 4
* é╚é╠é┼ăé╠âfâoâCâXé╓é╠âAâhâîâXé═
* -18(a1) é╞é╚éΦé▄é╖ 1992.03.17 YUU.
search_device:
blpeek
sd_loop:
move.l d0,a0
lea $000E(a0),a2
bsr check_TW
tst.l d0
bne sd_end
lea.l (a0),a1
blpeek
cmp.l #$ffffffff,d0
bne sd_loop
sd_not_found:
moveq.l #0,d0
sd_end:
rts
*
search_memory_blindly:
getpdb
move.l d0,a1
lea -16(a1),a1
search_top_loop:
lea 4(a1),a1
blpeek
tst.l d0
beq found_top
move.l d0,a1
bra search_top_loop
*
found_top:
lea -8(a1),a1 * é╚é║é⌐é▒é╠ìsé¬âRâüâôâgìsé╔é╚é┴é─éóé▄é╡é╜
* lea 8(a1),a1 * æ╜ò¬é▒é┴é┐é¬âRâüâôâgìsé╛é╞Ävéóé▄é╖
* 1992.03.17 YUU(HARUKA).
search_memory:
lea 12(a1),a1
blpeek
sm_loop:
move.l d0,a0
lea $010E(a0),a2
bsr check_TW
tst.l d0
bne sm_end
lea $000C(a0),a1
blpeek
tst.l d0
bne sm_loop
moveq.l #0,d0
sm_end:
rts
*
check_TW:
lea (a2),a1
blpeek
cmp.l #'?Twe',d0
beq check_new
cmp.l #'*Twe',d0
bne check_error
check_old:
lea $0004(a2),a1
blpeek
cmp.l #'nty*',d0
bne check_error
moveq.l #-1,d0
rts
*
check_new:
lea $0004(a2),a1
blpeek
cmp.l #'nty?',d0
beq check_new_E
cmp.l #'ntyE',d0
bne check_error
check_new_E:
lea $0008(a2),a1
blpeek
rts
*
check_error:
moveq.l #0,d0
rts
*
dc.b 'TwentyOne Option Checker Ver 1.00 '
dc.b 'Copyright 1991,92 édéÿéö (és.éjawamoto)',0
*
.end